package com.originskyseed.platform.count.service;

import javax.servlet.http.HttpServletRequest;

/**
 * @author tao
 * @date 2020/8/3 16:17
 */
public interface IOnlineService {

	/**
	 * 根据sessionId，统计用户时长信息
	 *
	 * @param request
	 * @return
	 * @throws Exception
	 */
	boolean online(HttpServletRequest request) throws Exception;

	/**
	 * 更新在线时长信息
	 *
	 * @param tenantCode
	 * @throws Exception
	 */
	void updateOnline(String tenantCode) throws Exception;

	/**
	 * 强制某个用户下线
	 *
	 * @param sessionId
	 * @return
	 * @throws Exception
	 */
	boolean offline(String sessionId) throws Exception;

}
